home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Science / RLaB / help / reshape < prev    next >
Text File  |  1994-04-25  |  540b  |  19 lines

  1. reshape:
  2.  
  3. Syntax:    reshape ( A , nrow, ncol )
  4.  
  5. Description:
  6.  
  7.     Reshape does what it's name implies, it reshapes the input
  8.     matrix so that the return value has the number of rows and
  9.     columns specified by the last two arguments. Reshape will not
  10.     reshape the matrix if the product of the new row and column
  11.     dimensions does not equal the product of the existing row and
  12.     column dimensions.
  13.  
  14. Examples:
  15.  
  16.     m = [1,2,3;4,5,6;7,8,9];
  17.     mrow = reshape(m, 1, 9); // converts m to a row matrix
  18.     mcol = reshape(m, 9, 1); // converts m to a column matrix
  19.